class UserModel {
  Data? data;
  String? returncode;

  UserModel({this.data, this.returncode});

  UserModel.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? Data.fromJson(json['data']) : null;
    returncode = json['returncode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data =  Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['returncode'] = returncode;
    return data;
  }
}

class Data {
  String? commandId;
  String? defultPasswd;
  String? netType;
  Operuser? operuser;
  Posrole? posrole;
  List<Posrolefunc>? posrolefunc;
  num? preMoney;
  num? syjCashCurNum;

  Data(
      {this.commandId,
        this.defultPasswd,
        this.netType,
        this.operuser,
        this.posrole,
        this.posrolefunc,
        this.preMoney,
        this.syjCashCurNum});

  Data.fromJson(Map<String, dynamic> json) {
    commandId = json['command_id'];
    defultPasswd = json['defultPasswd'];
    netType = json['netType'];
    operuser = json['operuser'] != null
        ? Operuser.fromJson(json['operuser'])
        : null;
    posrole =
    json['posrole'] != null ?  Posrole.fromJson(json['posrole']) : null;
    if (json['posrolefunc'] != null) {
      posrolefunc =  <Posrolefunc>[];
      json['posrolefunc'].forEach((v) {
        posrolefunc!.add(Posrolefunc.fromJson(v));
      });
    }
    preMoney = json['preMoney'];
    syjCashCurNum = json['syjCashCurNum'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['command_id'] = commandId;
    data['defultPasswd'] = defultPasswd;
    data['netType'] = netType;
    if (operuser != null) {
      data['operuser'] = operuser!.toJson();
    }
    if (posrole != null) {
      data['posrole'] = posrole!.toJson();
    }
    if (posrolefunc != null) {
      data['posrolefunc'] = posrolefunc!.map((v) => v.toJson()).toList();
    }
    data['preMoney'] = preMoney;
    data['syjCashCurNum'] = syjCashCurNum;
    return data;
  }
}

class Operuser {
  String? authrole;
  String? cardno;
  String? cardtype;
  int? entId;
  String? erpCode;
  String? gh;
  String? ghtype;
  String? isloginpos;
  num? level;
  num? maxdate;
  String? mkt;
  String? name;
  String? passwd;
  String? passwdflg;
  num? phKey;
  String? posrole;
  num? pwddate;
  String? randomCode;
  String? statu;
  num? tmdd;
  num? updateDate;
  String? yyygz;

  Operuser(
      {this.authrole,
        this.cardno,
        this.cardtype,
        this.entId,
        this.erpCode,
        this.gh,
        this.ghtype,
        this.isloginpos,
        this.level,
        this.maxdate,
        this.mkt,
        this.name,
        this.passwd,
        this.passwdflg,
        this.phKey,
        this.posrole,
        this.pwddate,
        this.randomCode,
        this.statu,
        this.tmdd,
        this.updateDate,
        this.yyygz});

  Operuser.fromJson(Map<String, dynamic> json) {
    authrole = json['authrole'];
    cardno = json['cardno'];
    cardtype = json['cardtype'];
    entId = json['entId'];
    erpCode = json['erpCode'];
    gh = json['gh'];
    ghtype = json['ghtype'];
    isloginpos = json['isloginpos'];
    level = json['level'];
    maxdate = json['maxdate'];
    mkt = json['mkt'];
    name = json['name'];
    passwd = json['passwd'];
    passwdflg = json['passwdflg'];
    phKey = json['ph_key'];
    posrole = json['posrole'];
    pwddate = json['pwddate'];
    randomCode = json['randomCode'];
    statu = json['statu'];
    tmdd = json['tmdd'];
    updateDate = json['updateDate'];
    yyygz = json['yyygz'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['authrole'] = this.authrole;
    data['cardno'] = this.cardno;
    data['cardtype'] = this.cardtype;
    data['entId'] = this.entId;
    data['erpCode'] = this.erpCode;
    data['gh'] = this.gh;
    data['ghtype'] = this.ghtype;
    data['isloginpos'] = this.isloginpos;
    data['level'] = this.level;
    data['maxdate'] = this.maxdate;
    data['mkt'] = this.mkt;
    data['name'] = this.name;
    data['passwd'] = this.passwd;
    data['passwdflg'] = this.passwdflg;
    data['ph_key'] = this.phKey;
    data['posrole'] = this.posrole;
    data['pwddate'] = this.pwddate;
    data['randomCode'] = this.randomCode;
    data['statu'] = this.statu;
    data['tmdd'] = this.tmdd;
    data['updateDate'] = this.updateDate;
    data['yyygz'] = this.yyygz;
    return data;
  }
}

class Posrole {
  String? breakprice;
  String? cashboxqx;
  String? deductqx;
  num? entId;
  String? erpCode;
  String? grantgz;
  String? isgrant;
  String? name;
  String? operrange;
  String? phKey;
  String? printzp;
  num? privdpzkl;
  String? privdy;
  String? privgj;
  String? privqt1;
  String? privqt10;
  String? privqt2;
  String? privqt3;
  String? privqt4;
  String? privqt5;
  String? privqt6;
  String? privqt7;
  String? privqt8;
  String? privqt9;
  num? privqtje1;
  num? privqtje2;
  num? privqtje3;
  num? privqtje4;
  String? privqx;
  String? privth;
  String? privhc;

  num? privthje;
  num? privzpzkl;
  String? putbillqx;
  String? reportqx;
  num? roleid;
  String? statu;
  String? tempcardqx;
  num? updateDate;

  Posrole(
      {this.breakprice,
        this.cashboxqx,
        this.deductqx,
        this.entId,
        this.erpCode,
        this.grantgz,
        this.isgrant,
        this.name,
        this.operrange,
        this.phKey,
        this.printzp,
        this.privdpzkl,
        this.privdy,
        this.privgj,
        this.privqt1,
        this.privqt10,
        this.privqt2,
        this.privqt3,
        this.privqt4,
        this.privqt5,
        this.privqt6,
        this.privqt7,
        this.privqt8,
        this.privqt9,
        this.privqtje1,
        this.privqtje2,
        this.privqtje3,
        this.privqtje4,
        this.privqx,
        this.privth,
        this.privthje,
        this.privzpzkl,
        this.putbillqx,
        this.reportqx,
        this.roleid,
        this.statu,
        this.tempcardqx,
        this.updateDate});

  Posrole.fromJson(Map<String, dynamic> json) {
    breakprice = json['breakprice'];
    cashboxqx = json['cashboxqx'];
    deductqx = json['deductqx'];
    entId = json['entId'];
    erpCode = json['erpCode'];
    grantgz = json['grantgz'];
    isgrant = json['isgrant'];
    name = json['name'];
    operrange = json['operrange'];
    phKey = json['ph_key'];
    printzp = json['printzp'];
    privdpzkl = json['privdpzkl'];
    privdy = json['privdy'];
    privgj = json['privgj'];
    privqt1 = json['privqt1'];
    privqt10 = json['privqt10'];
    privqt2 = json['privqt2'];
    privqt3 = json['privqt3'];
    privqt4 = json['privqt4'];
    privqt5 = json['privqt5'];
    privqt6 = json['privqt6'];
    privqt7 = json['privqt7'];
    privqt8 = json['privqt8'];
    privqt9 = json['privqt9'];
    privqtje1 = json['privqtje1'];
    privqtje2 = json['privqtje2'];
    privqtje3 = json['privqtje3'];
    privqtje4 = json['privqtje4'];
    privqx = json['privqx'];
    privth = json['privth'];
    privhc = json['privhc'];
    privthje = json['privthje'];
    privzpzkl = json['privzpzkl'];
    putbillqx = json['putbillqx'];
    reportqx = json['reportqx'];
    roleid = json['roleid'];
    statu = json['statu'];
    tempcardqx = json['tempcardqx'];
    updateDate = json['updateDate'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['breakprice'] = this.breakprice;
    data['cashboxqx'] = this.cashboxqx;
    data['deductqx'] = this.deductqx;
    data['entId'] = this.entId;
    data['erpCode'] = this.erpCode;
    data['grantgz'] = this.grantgz;
    data['isgrant'] = this.isgrant;
    data['name'] = this.name;
    data['operrange'] = this.operrange;
    data['ph_key'] = this.phKey;
    data['printzp'] = this.printzp;
    data['privdpzkl'] = this.privdpzkl;
    data['privdy'] = this.privdy;
    data['privgj'] = this.privgj;
    data['privqt1'] = this.privqt1;
    data['privqt10'] = this.privqt10;
    data['privqt2'] = this.privqt2;
    data['privqt3'] = this.privqt3;
    data['privqt4'] = this.privqt4;
    data['privqt5'] = this.privqt5;
    data['privqt6'] = this.privqt6;
    data['privqt7'] = this.privqt7;
    data['privqt8'] = this.privqt8;
    data['privqt9'] = this.privqt9;
    data['privqtje1'] = this.privqtje1;
    data['privqtje2'] = this.privqtje2;
    data['privqtje3'] = this.privqtje3;
    data['privqtje4'] = this.privqtje4;
    data['privqx'] = this.privqx;
    data['privth'] = this.privth;
    data['privhc'] = this.privhc;
    data['privthje'] = this.privthje;
    data['privzpzkl'] = this.privzpzkl;
    data['putbillqx'] = this.putbillqx;
    data['reportqx'] = this.reportqx;
    data['roleid'] = this.roleid;
    data['statu'] = this.statu;
    data['tempcardqx'] = this.tempcardqx;
    data['updateDate'] = this.updateDate;
    return data;
  }
}

class Posrolefunc {
  String? func;

  Posrolefunc({this.func});

  Posrolefunc.fromJson(Map<String, dynamic> json) {
    func = json['func'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['func'] = func;
    return data;
  }
}